program include_or_out;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  n, i, s, s1, s2, x, y : integer;
  fin : textFile;
  massx, massy : array of integer;
begin
  readln (x, y);
  assignFile(fin,'input.txt');
  reset(fin);
  read(fin, n);
  setLength(massx,n-1);
  setLength(massy,n-1);
  for i:=0 to (2*n-1) do
   begin
     if (i mod 2 = 0) then
     begin
       read(fin, massx[i div 2]);
     end else begin
       read(fin, massy[i div 2]);
     end;
   end;

  s1:=0;
  for i:= 0 to n-1 do
  begin
    s:=(massx[i]*massy[i+1]-massx[i+1]*massy[i]);
    if (s<0) then
      s := -s;
    s1 := (s1+s);
  end;
  s2 := 0;
  for i := 0 to n-1 do
  begin
    s := ((massx[i]-x)*(massy[i+1]-y)-(massx[i+1]-x)*(massy[i]-y));
    if (s < 0) then
      s := -s;
    s2 := s2 + s;
  end;
  if (s1 = s2) then
    writeln('inside')
  else
    writeln('outside');

  readln;
  closeFile(fin);
end.


